<link rel="stylesheet" href="/static/admin/css/welcome.css?v={$version}" media="all">
<div class="layui-layout layui-padding-2">
    <div class="layui-layout-admin">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md9 ">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-md3 ">

                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-calendar icon"></i><span id="time"></span>
                            </div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space2">
                                        <div class="layui-col-xs2">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">周{$week}</div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">{$wnl.lMonth}月 {$wnl.lDate}</div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="layui-panel">
                                                <div class="{$class}">
                                                    {$wnl.gzDate}日 {$wnl.gzMonth}月 {$wnl.gzYear}{$wnl.animal}年
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6"></div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-col-md5 ">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-warning icon"></i>{$msg}</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                        <div class="layui-col-xs3">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">
                                                    <span class="layui-badge layui-bg-blue fa-pull-right ">总计</span>
                                                    <div class="panel-content">
                                                        <h2>{$model.sum_duration} 天</h2>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">
                                                    <span class="layui-badge layui-bg-red fa-pull-right ">请假</span>
                                                    <div class="panel-content">
                                                        <h2>{$model.leave_days} 天</h2>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">
                                                    <span class="layui-badge layui-bg-orange fa-pull-right ">休息</span>
                                                    <div class="panel-content">
                                                        <h2>{$model.rest_days} 天</h2>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3">
                                            <div class="layui-panel">
                                                <div class="layui-card-body">
                                                    <span class="layui-badge layui-bg-green fa-pull-right ">开车</span>
                                                    <div class="panel-content">
                                                        <h2>{$model.drive_days} 天</h2>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12 ">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-line-chart icon"></i>报表统计</div>
                            <div class="layui-card-body">
                                <div class="layui-row layui-col-space10">
                                    <div class="layui-col-md6">
                                        <div id="echarts-records" style="width: 100%;min-height:300px"></div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <div id="leave-echarts-records" style="width: 100%;min-height:300px"></div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md3 ">

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-credit-card icon icon-blue"></i>快捷入口</div>
                    <div class="layui-card-body">
                        <div class="welcome-module">
                            <div class="layui-row layui-col-space10">
                                <div class="swiper mySwiper">
                                    <div class="swiper-wrapper">
                                        {foreach $quicks as $value}

                                        <div class="swiper-slide">
                                            {foreach $value as $vo}

                                            <div class="layui-col-xs3 layuimini-qiuck-module">
                                                <a layuimini-content-href="{:url($vo['href'])}"
                                                    data-title="{$vo['title']}">
                                                    <i class="{$vo['icon']|raw}"></i>
                                                    <cite>{$vo['title']}</cite>
                                                </a>
                                            </div>
                                            {/foreach}

                                        </div>
                                        {/foreach}

                                    </div>
                                </div>
                                <div class="swiper-pagination"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
                    <div class="layui-card-body layui-text">
                        <p>
                            本模板基于layui2.x以及font-awesome-6.x进行实现。
                            <a class="layui-btn layui-btn-xs layui-btn-danger" style="vertical-align: baseline;"
                                target="_blank" href="http://layui.dev/docs">layui文档</a>
                        </p>
                        <hr>
                        <p class="layui-font-red">备注：此后台框架永久开源，但请勿进行出售或者上传到任何素材网站，否则将追究相应的责任。</p>
                        <hr>
                        <div class="layui-card-header"><i class="fa fa-qq icon"></i>QQ交流群</div>
                        <div class="layui-card-body">
                            <img src="/static/common/images/EasyAdmin8-ThinkPHP.png" width="145">
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

<script>


    setInterval(() => {
        $("#time").text(time());
    }, 1000);

    function time() {
        var now = new Date();

        var year = now.getFullYear(); //得到年份

        var month = now.getMonth() + 1;//得到月份

        var date = now.getDate();//得到日期

        var hour = now.getHours();//得到小时数

        var minute = now.getMinutes();//得到分钟数

        var second = now.getSeconds();//得到秒数

        return year + "-" + addZero(month) + "-" + addZero(date) + " " + addZero(hour) + ":" + addZero(minute) + ":" + addZero(second);

    }

    function addZero(num) {
        return num.toString().padStart(2, '0');
    }
</script>